home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 August / 1986-08.d64 / pirate cove (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  7KB  |  263 lines

  1. 10 x=rnd(-ti):s=54272:v=53248
  2. 20 dim t(25),r$(25),r1$(25),i$(8)
  3. 30 dim q$(2,8),q1$(2,25)
  4. 40 dim a$(2,8),a1$(2,25)
  5. 50 dim d(125),lo(25),lc(25),l(25)
  6. 60 poke53281,0:poke53280,0:print"[147]"
  7. 70 fori=0to24:pokes+i,0:next
  8. 80 print""tab(14)"[155]pirate cove":gosub1470:gosub1470
  9. 90 print"a mini-adventure for kids"
  10. 100 printtab(13)"[154][please wait]"
  11. 110 fori=12288to12607:reada:pokei,a:next
  12. 120 poke2040,193
  13. 130 fori=2041to2043:pokei,197:next
  14. 140 fori=v+40tov+42:pokei,2:next
  15. 150 pokev+39,10:pokev+37,7:pokev+38,5
  16. 160 pokev+29,15:pokev+23,1
  17. 170 pokev+28,1:pokev+27,14
  18. 180 pokev+16,1:pokev,0:pokev+1,75
  19. 190 x=61:y=81:pokev+21,1
  20. 200 pokev+2,x:pokev+4,x+48:pokev+6,x+96
  21. 210 fori=12608to12608+23:pokei,255:next
  22. 220 fori=12608+24to12608+63:pokei,0:next
  23. 230 fori=1to10:readr$(i):next
  24. 240 fori=1to8:readq$(1,i):reada$(1,i):next
  25. 250 fori=1to8:readq$(2,i):reada$(2,i):next
  26. 260 fori=1to100:readd(i):next
  27. 270 fori=1to25:readlo(i):next
  28. 280 fori=11to25:r$(i)="high seas":next
  29. 290 fori=1to10:lc(i)=1:next
  30. 300 fori=11to25:lc(i)=2:next
  31. 310 f1=0:f2=0:q=1
  32. 320 fori=1to8:i$(i)="":next
  33. 330 fori=1to25:t(i)=0:next
  34. 340 fori=1to25
  35. 350 rn=int(rnd(1)*25)+1
  36. 360 ift(rn)=1then350
  37. 370 t(rn)=1:r1$(rn)=r$(i):l(rn)=lc(i)
  38. 380 next
  39. 390 z=1:fori=1to25
  40. 400 ifr1$(i)="treasure island"then480
  41. 410 ifr1$(i)="sea monster's lair"then480
  42. 420 ifr1$(i)="high seas"then480
  43. 430 q1$(1,i)=q$(1,z)
  44. 440 q1$(2,i)=q$(2,z)
  45. 450 a1$(1,i)=a$(1,z)
  46. 460 a1$(2,i)=a$(2,z)
  47. 470 z=z+1
  48. 480 next
  49. 490 fori=1to25:ifr1$(i)="pirate cove"thenr=i:rr=r
  50. 500 next
  51. 510 tm=r:ifr1$(r)="treasure island"then1040
  52. 520 print"[147][155]current location: ";
  53. 530 gosub1470
  54. 540 printr1$(r)"[155]"
  55. 550 print""
  56. 560 ifr1$(r)="high seas"then960
  57. 570 ifr1$(r)="sea monster's lair"then1270
  58. 580 poke2040,193:pokev+39,10:pokev+37,7:pokev+38,5
  59. 590 y=81:k=1:d=5
  60. 600 pokev+3,y:pokev+5,y:pokev+7,y:pokev+21,15
  61. 610 l=len(q1$(1,r)):l2=len(q1$(2,r))
  62. 620 printtab(14-l/2)"[155]"q1$(1,r)
  63. 630 printtab(14-l2/2)q1$(2,r)
  64. 640 printtab(10)"read map"
  65. 650 printtab(10)"sail on"
  66. 660 printtab(7)"list inventory"
  67. 670 gosub1790
  68. 680 onkgoto860,860,1520,690,1910
  69. 690 print"[147][155]sail:[158]";
  70. 700 y=81:d=4:k=1
  71. 710 pokev+3,y:pokev+21,3
  72. 720 print"[155]"tab(5)"north"
  73. 730 printtab(5)"south"
  74. 740 printtab(5)"east"
  75. 750 printtab(5)"west"
  76. 760 gosub1790
  77. 770 ifk=1thenr=r-5
  78. 780 ifk=2thenr=r+5
  79. 790 ifk=3thenr=r+1
  80. 800 ifk=4thenr=r-1
  81. 810 ifd(((tm-1)*4)+k)=1thenpokev+21,1:goto510
  82. 820 poke2040,196:pokev+39,6:pokev+37,1:pokev+38,7:pokev+21,1
  83. 830 print"storm ahead-go another way":print"":gosub1890:gosub1470
  84. 840 gosub1860:r=tm:goto690
  85. 850 -----rem search-----
  86. 860 print"[156]you find "a1$(k,r)
  87. 870 g$=a1$(k,r)
  88. 880 ifg$="a key"thenf1=1
  89. 890 ifg$="a cutlass"thenf2=1
  90. 900 ifleft$(g$,7)="nothing"then940
  91. 910 fori=1to8:ifg$=i$(i)then940
  92. 920 next
  93. 930 i$(q)=g$:q=q+1
  94. 940 printtab(7)"":gosub1860:goto510
  95. 950 -----rem high seas-----
  96. 960 poke2040,192:pokev+39,6:pokev+37,1:pokev+38,2
  97. 970 k=1:d=2:y=81
  98. 980 pokev+3,y:pokev+5,y:pokev+21,7
  99. 990 printtab(7)"[155]read map"
  100. 1000 printtab(7)"sail on"
  101. 1010 gosub1790
  102. 1020 onkgoto1520,690
  103. 1030 -----rem treasure island-----
  104. 1040 poke2040,193:pokev+39,10:pokev+37,7:pokev+38,5
  105. 1050 print"[147][155]you have landed at treasure island":gosub1890:gosub1470
  106. 1060 print"and found the treasure chest"
  107. 1070 print"[153]press any key to see if it will open."
  108. 1080 getk$:ifk$=""then1080
  109. 1090 if f1=1then1150
  110. 1100 print"[147][155]you don't have the key"
  111. 1110 print"you must continue on your journey,"
  112. 1120 print"find the key and return to
  113. 1130 [153]"treasure island."
  114. 1140 [141]1860:[137]690
  115. 1150 [151]2040,194:[151]v[170]39,6:[151]v[170]37,1:[151]v[170]38,2:[141]1890
  116. 1160 [153]"loadlistyour key opens the chest."
  117. 1170 [153]"you win"
  118. 1180 [153]"printother treasures:list"
  119. 1190 [129]i[178]1[164]8:[153]i$(i):[130]
  120. 1200 [153]"contplay again [y/n]
  121. 1210 getk$:ifk$=""then1210
  122. 1220 ifk$="y"thenpokev+21,0:goto1250
  123. 1230 ifk$="n"thensys2048:end
  124. 1240 goto1210
  125. 1250 printtab(9)"[154][please wait a moment]":goto310
  126. 1260 -----rem monster-----
  127. 1270 pokev+39,6:pokev+37,2:pokev+38,1:poke2040,195
  128. 1280 y=81:d=2:k=1:pokev+3,y:pokev+5,y:pokev+21,7:gosub1890
  129. 1290 printtab(6)"sail away"
  130. 1300 printtab(8)"fight"
  131. 1310 gosub1790
  132. 1320 ifk=2then1390
  133. 1330 rn=rnd(1):ifrn>.8thentm=r:goto690
  134. 1340 print"not fast enough"
  135. 1350 print"the monster damaged your ship"
  136. 1360 print"you must go back to pirate cove and
  137. 1370 [153]"start over again."
  138. 1380 r[178]rr:[141]1860:[137]510
  139. 1390 [139]f2[178]0[167]1430
  140. 1400 [153]"you defeated the sea monster"
  141. 1410 [153]"you may continue on your journey."
  142. 1420 tm[178]r:[141]1860:[151]v[170]21,1:[137]690
  143. 1430 [153]"you cannot fight the monster without"
  144. 1440 [153]"a cutlass"
  145. 1450 [137]1360
  146. 1460 [171][171][171][171][171][143] sound sub-----
  147. 1470 [151]s[170]24,15:[151]s[170]5,9:[151]s[170]4,17
  148. 1480 [151]s[170]1,6:[151]s,108:[129]t[178]1[164]1000:[130]
  149. 1490 [151]s[170]4,16:[129]t[178]1[164]25:[130]
  150. 1500 [142]
  151. 1510 [171][171][171][171][171][143] draw map-----
  152. 1520 [151]v[170]21,0
  153. 1530 [153]"load"[163]7)"listnavigation map"
  154. 1540 x$[178]"(NULL)usr(NULL)"
  155. 1550 y$[178]"sgn +"
  156. 1560 z$[178]"(NULL)andsqr"
  157. 1570 [129]i[178]1[164]5:[153][163]7);
  158. 1580 [129]j[178]1[164]5:[153]x$;:[130]:[153]
  159. 1590 [153][163]7);
  160. 1600 [129]j[178]1[164]5:[153]y$;:[130]:[153]
  161. 1610 [153][163]7);
  162. 1620 [129]j[178]1[164]5:[153]z$;:[130]:[153]
  163. 1630 [130]
  164. 1640 [129]i[178]1[164]25
  165. 1650 [139]l(i)[178]1[167][151]lo(i),81:[151]lo(i)[170]s,5
  166. 1660 [139]l(i)[178]2[167][151]lo(i),45:[151]lo(i)[170]s,6
  167. 1670 [130]
  168. 1680 [151]lo(r),81:[151]lo(r)[170]s,7
  169. 1690 [153]""[163]27)"(NULL)list = land"
  170. 1700 [153][163]27)"-list = water"
  171. 1710 [153][163]27)"sys(NULL)list = current"
  172. 1720 [153][163]31)"location"
  173. 1730 [153][163]33)"sysn"
  174. 1740 [153][163]33)"(NULL)"
  175. 1750 [153][163]31)"w-(NULL)-e"
  176. 1760 [153][163]33)"(NULL)"
  177. 1770 [153][163]33)"s"
  178. 1780 [153]"":[141]1860:[137]510
  179. 1790 [161]k$:[139]k$[178]""[167]1790
  180. 1800 [139]k$[178][199](13)[167][142]
  181. 1810 [139]k$[179][177]""[167]1790
  182. 1820 k[178]k[170]1:y[178]y[170]8
  183. 1830 [139]k[177]d[167]k[178]1:y[178]81
  184. 1840 [151]v[170]3,y:[151]v[170]5,y:[151]v[170]7,y
  185. 1850 [137]1790
  186. 1860 [153][163]6)"cont[press any key to continue]"
  187. 1870 [161]k$:[139]k$[178]""[167]1870
  188. 1880 [142]
  189. 1890 [129]i[178]1[164]11:[151]53280,i
  190. 1900 [129]t[178]1[164]25:[130]:[130]:[151]53280,0:[142]
  191. 1910 [153]"inventory:"
  192. 1920 [129]i[178]1[164]8:[153]i$(i):[130]
  193. 1930 [153]"":[141]1860:[151]v[170]21,1:[137]520
  194. 1940 [131] 0,0,0,1,192,0,1,192
  195. 1950 [131] 0,4,192,0,4,192,0,20
  196. 1960 [131] 192,0,20,192,0,20,193,192
  197. 1970 [131] 20,197,192,4,197,192,4,197
  198. 1980 [131] 192,1,197,192,1,193,192,240
  199. 1990 [131] 192,207,63,255,252,15,255,252
  200. 2000 [131] 3,255,252,170,187,190,42,174
  201. 2010 [131] 234,10,170,168,0,170,128,255
  202. 2020 [131]0,0,0,0,0,60,0,0
  203. 2030 [131]192,3,195,0,0,51,240,0
  204. 2040 [131]15,12,3,248,192,12,8,48
  205. 2050 [131]0,50,48,0,194,0,0,192
  206. 2060 [131]128,0,192,128,0,0,128,0
  207. 2070 [131]0,128,0,2,0,0,86,64
  208. 2080 [131]5,85,84,21,85,80,1,85
  209. 2090 [131]64,0,21,0,0,0,0,0
  210. 2100 [131]5,0,0,1,64,0,0,80
  211. 2110 [131]0,0,20,0,0,5,0,0
  212. 2120 [131]1,64,0,0,80,21,85,80
  213. 2130 [131]16,0,16,18,170,16,18,34
  214. 2140 [131]16,208,32,16,16,32,28,16
  215. 2150 [131]32,16,208,32,19,21,85,80
  216. 2160 [131]0,0,204,48,12,48,0,195
  217. 2170 [131]12,12,12,48,0,0,192,0
  218. 2180 [131]0,16,0,0,32,0,0,8
  219. 2190 [131]0,0,8,0,0,8,0,72
  220. 2200 [131]32,33,34,32,136,0,170,0
  221. 2210 [131]0,158,0,10,182,160,160,158
  222. 2220 [131]10,128,182,2,64,170,1,2
  223. 2230 [131]8,128,8,8,32,8,32,32
  224. 2240 [131]16,32,4,0,32,0,0,8
  225. 2250 [131]0,0,4,0,0,0,0,0
  226. 2260 [131] 1,84,0,4,1,64,4,0
  227. 2270 [131] 20,16,0,1,16,80,1,17
  228. 2280 [131] 0,1,64,0,65,64,0,68
  229. 2290 [131] 16,1,80,5,84,128,128,48
  230. 2300 [131] 8,8,50,0,0,192,200,32
  231. 2310 [131] 200,192,0,192,194,35,195,32
  232. 2320 [131] 3,35,0,3,3,8,3,12
  233. 2330 [131] 0,0,12,0,0,12,0,72
  234. 2340 [131] treasure island, sea monster's lair, bluebeard's bay
  235. 2350 [131] mermaid's lagoon, capt. hook's swamp, spice island
  236. 2360 [131] jewel island, skeleton inlet, barbary coast,pirate cove
  237. 2370 [131] sift through sand, a few pieces of eight
  238. 2380 [131] search island, nothing of interest.
  239. 2390 [131] search old galleon, some silver jewelry
  240. 2400 [131] search island, exotic spices
  241. 2410 [131] search harbor, a cutlass
  242. 2420 [131] search swamp, nothing but snakes
  243. 2430 [131] sea